package kordegi.forumsystem.controller;

import kordegi.forumsystem.entity.User;
import kordegi.forumsystem.service.Impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author kordegi
 * @date 2022.05.01 15:20
 * @Description
 */

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserServiceImpl userService;

    @RequestMapping("getUser/{id}")
    public String getUser(@PathVariable Long id) {
        return userService.getById(id).toString();
    }

}
